import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import Cate from './category';
import store from './store/index';
const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
root.render(
    <App />
    // <Cate></Cate>
);
//6.监听状态管理器，全局数据发生变化直接重新渲染
store.subscribe(() => {  //订阅状态管理器
  root.render(
      <App />
  );
})